<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>酒店详情页</title>
    <script type="text/javascript" src="/js/jquery/jquery.min.js"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link rel="icon" type="image/x-icon" href="favicon.ico">
    <link href="iTunesArtwork@2x.png" sizes="114x114" rel="apple-touch-icon-precomposed">
    <link type="text/css" rel="stylesheet" href="/themes/css/base.css">
    <link type="text/css" rel="stylesheet" href="/themes/css/icon.css">
    <link type="text/css" rel="stylesheet" href="/themes/css/home.css">
    <script type="text/javascript" src="/hotelList/js/tab.js"></script>
    <script src="/js/common.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script type="text/javascript" src="/themes/js/tab.js"></script>
    <script type="text/javascript" src="/themes/js/data.js"></script>
    <script type="text/javascript" src="/themes/js/touchSlider.js"></script>
    <script src="/js/plugins/My97DatePicker/WdatePicker.js"></script>

</head>
<body id="body">
<section class="aui-flexView" id="navHead" style="height:auto">
    <header class="aui-navBar aui-navBar-bg aui-navBar-fixed" id="nav-wrap">
        <!--后退-->
        <a href="/hotelList.html" class="aui-navBar-item" style="min-width: 13%; flex: 0 0 13%;">
            <i class="aui-icon icon-return"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title aui-center-title-none" render-html="hotel.title"></span>
        </div>
        <a href="javascript:;" class="aui-navBar-item" style="min-width: 13%; flex: 0 0 13%;">
            <i class="icon icon-news"></i>
        </a>
    </header>
    <section class="aui-scrollView">
        <div class="img_gallery" id="commodity">
            <div class="main_img">
                <ul>
                    <li>
                        <img render-src="hotel.coverUrl" alt="">
                    </li>
                </ul>
            </div>
        </div>
        <div class="aui-content-text">
            <div class="aui-content-box">
                <div class="aui-introduce" render-html="introduce">
                </div>
                <div class="aui-flex aui-flex-clear-align-items">
                    <div class="aui-flex-in-title">入住须知：</div>
                    <div class="aui-flex-box" render-html="toCustomer">
                    </div>
                </div>
                <div class="aui-flex">
                    <div class="aui-flex-box">
                        <span class="aui-tag-coup">酒店红包</span>
                        <span class="aui-tag-coup">门店新客立减</span>
                        <span class="aui-tag-coup">连住优惠</span>
                    </div>
                    <div class="aui-green-arrow"></div>
                </div>
                <div class="aui-flex">
                    <div class="aui-flex-box">
                            <span class="aui-hotel-stars-small">
                                <img src="themes/img/icon/stars-one.png">
                            </span>
                            <h5 render-html="hotel.grades"></h5>
                    </div>
                    <a class="aui-green-arrow" href="/hotelComments.html">查看全部点评</a>
                </div>
                <div class="aui-flex aui-flex-go-to">
                    <div class="aui-flex-item-info">
                        <h3 onclick="WdatePicker()">入住</h3>
                        <p>9月12日今天</p>
                    </div>
                    <div class="aui-flex-item-info">
                        <h4>共8晚</h4>
                    </div>
                    <div class="aui-flex-item-info">
                        <h3 onclick="WdatePicker()">离店</h3>
                        <p>9月26日周三</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="aui-room-list">
            <ul class="aui-data-show-list" render-loop="rooms">
                <!--房型-->
                <li class="aui-flex b-line">
                    <div class="aui-flex-small-room">
                        <!--alt""?-->
                        <img render-src="rooms.coverUrl">
                    </div>
                    <div class="aui-flex-box">
                        <h3><em>￥</em>525</h3>
                        <p class="aui-price-one" render-html="rooms.hotelTypeName"></p>
                        <div class="aui-company">
                            <span render-html="hotel.title"></span>
                            <span>官方旗舰店</span>
                        </div>
                    </div>
                    <a class="aui-flex-take" data-href="/hotelorderPage.html?id=">
                        <div class="aui-flex-take-text">订</div>
                        <div class="aui-flex-take-pay">在线付</div>
                    </a>
                </li>
            </ul>
        </div>
    </section>
</section>
<script type="text/javascript">

    $(document).ready(function () {

        $(".main_img").touchSlider({
            flexible: true,
            speed: 200,
            btn_prev: $("#btn_prev"),
            btn_next: $("#btn_next"),
            paging: $(".point a"),
            counter: function (e) {
                $(".point a").removeClass("on").eq(e.current - 1).addClass("on");
                $(".img_font span").hide().eq(e.current - 1).show();
            }
        });

    });
    $(document).ready(function () {
        var navHeight = $("#navHead").offset().top;
        var navFix = $("#nav-wrap");
        $(window).scroll(function () {
            if ($(this).scrollTop() > navHeight) {
                navFix.addClass("aui-flex");
            } else {
                navFix.removeClass("aui-flex");
            }
        })
    });

    $(document).ready(function () {
        $(".btn-slide").click(function () {
            $("#show").slideToggle();
        });
    });
    //获取当前酒店
    var params = getParams();
    if (params.id) {
        $.get("/hotelDetails/" + params.id, function (data) {
            if (data) {
                console.log(data);
                $("#body").renderValues(data);
                //获取当前酒店的房型
                $(".aui-room-list").renderValues(data);

                //订酒店
                $(".aui-flex-take").click(function () {
                    // alert(12);
                    var href = $(this).data("href");
                    console.log(href);
                    window.location.href = /*"http://localhost"+*/href + params.id;
                });
            }
        });
    }

</script>

</body>
</html>